Fixed objects not being selected after paste
This commit is contained in:
parent
10f3ff40de
commit
e88d9c504c
3 changed files with 6 additions and 5 deletions
|
|
@ -102,6 +102,7 @@ std::vector<CanvasComponentContainer::ObjInfoIterator> DrawingProgramLayerManage
|
|||
throw std::runtime_error("[DrawingProgramLayerManager::add_many_components_to_layer_being_edited] No layer selected!");
|
||||
auto toRet = editLayerPtr->get_layer().components->insert_ordered_list_and_send_create(editLayerPtr->get_layer().components, newObjs);
|
||||
add_undo_place_components(editingLayer.lock().get(), toRet);
|
||||
return toRet;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ bool GUIManager::radio_button_field(const char* id, std::string_view name, bool
|
|||
bool GUIManager::input_color_component_255(const char* id, float* val, const std::function<void(SelectionHelper&)>& elemUpdate) {
|
||||
push_id(id);
|
||||
bool isUpdating = insert_element<TextBox<float>>()->update(*io, val,
|
||||
[&](std::string_view str) {
|
||||
[&](const std::string& str) {
|
||||
int roundTo255;
|
||||
std::stringstream ss;
|
||||
ss << str;
|
||||
|
|
@ -520,7 +520,7 @@ bool GUIManager::input_scalar(const char* id, uint8_t* val, uint8_t min, uint8_t
|
|||
bool isUpdating = false;
|
||||
push_id(id);
|
||||
isUpdating = insert_element<TextBox<uint8_t>>()->update(*io, val,
|
||||
[&](std::string_view a) {
|
||||
[&](const std::string& a) {
|
||||
if(a.empty())
|
||||
return min;
|
||||
uint32_t toRet;
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ class GUIManager {
|
|||
return toRet;
|
||||
}
|
||||
|
||||
template <typename T> bool input_generic(const char* id, T* val, const std::function<std::optional<T>(std::string_view)>& fromStr, const std::function<std::string(const T&)>& toStr, bool singleLine, bool updateEveryEdit, const std::function<void(SelectionHelper&)>& elemUpdate = nullptr) {
|
||||
template <typename T> bool input_generic(const char* id, T* val, const std::function<std::optional<T>(const std::string&)>& fromStr, const std::function<std::string(const T&)>& toStr, bool singleLine, bool updateEveryEdit, const std::function<void(SelectionHelper&)>& elemUpdate = nullptr) {
|
||||
bool isUpdating = false;
|
||||
push_id(id);
|
||||
isUpdating = insert_element<TextBox<T>>()->update(*io, val, fromStr, toStr, singleLine, updateEveryEdit, elemUpdate);
|
||||
|
|
@ -157,7 +157,7 @@ class GUIManager {
|
|||
|
||||
template <typename T> bool input_scalar(const char* id, T* val, T min, T max, int decimalPrecision = 0, const std::function<void(SelectionHelper&)>& elemUpdate = nullptr) {
|
||||
return input_generic<T>(id, val,
|
||||
[&](std::string_view a) {
|
||||
[&](const std::string& a) {
|
||||
if(a.empty())
|
||||
return min;
|
||||
T toRet;
|
||||
|
|
@ -199,7 +199,7 @@ class GUIManager {
|
|||
|
||||
template <typename T> bool input_color_hex(const char* id, T* val, bool selectAlpha, const std::function<void(SelectionHelper&)>& elemUpdate = nullptr) {
|
||||
return input_generic<T>(id, val,
|
||||
[&](std::string_view str) {
|
||||
[&](const std::string& str) {
|
||||
T def = {0.0f, 0.0f, 0.0f, 1.0f};
|
||||
unsigned startIndex = 0;
|
||||
if(str.empty())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue