Index: binaries/data/mods/public/gui/credits/texts/programming.json =================================================================== --- binaries/data/mods/public/gui/credits/texts/programming.json +++ binaries/data/mods/public/gui/credits/texts/programming.json @@ -67,6 +67,7 @@ {"nick": "Dietger", "name": "Dietger van Antwerpen"}, {"nick": "dp304"}, {"nick": "dpiquet", "name": "Damien Piquet"}, + {"nick": "drummyfish", "name": "Miloslav Číž"}, {"nick": "dumbo"}, {"nick": "Dunedan", "name": "Daniel Roschka"}, {"nick": "dvangennip", "name": "Doménique"}, Index: source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp =================================================================== --- source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp +++ source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp @@ -401,6 +401,8 @@ g_SelectedTexture = _T("grass1_spring"); g_SelectedTexture.NotifyObservers(); + g_SelectedObject = _T("gaia/flora_tree_carob"); + SetOpenFilename(_T("")); #if defined(__WXMSW__) @@ -613,6 +615,7 @@ // (button label; tooltip text; image; internal tool name; section to switch to) toolbar->AddToolButton(_("Default"), _("Default"), _T("default.png"), _T(""), _T("")); toolbar->AddToolButton(_("Move"), _("Move/rotate object"), _T("moveobject.png"), _T("TransformObject"), _T("")/*_T("ObjectSidebar")*/); + toolbar->AddToolButton(_("Place"), _("Place object"), _T("place.png"), _T("PlaceObject"), _T("")/*_T("ObjectSidebar")*/); toolbar->AddToolButton(_("Elevation"), _("Alter terrain elevation"), _T("alterelevation.png"), _T("AlterElevation"), _T("")/*_T("TerrainSidebar")*/); toolbar->AddToolButton(_("Smooth"), _("Smooth terrain elevation"), _T("smoothelevation.png"), _T("SmoothElevation"), _T("")/*_T("TerrainSidebar")*/); toolbar->AddToolButton(_("Flatten"), _("Flatten terrain elevation"), _T("flattenelevation.png"), _T("FlattenElevation"), _T("")/*_T("TerrainSidebar")*/); Index: source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp =================================================================== --- source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp +++ source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp @@ -287,6 +287,7 @@ EVT_TEXT(ID_ObjectFilter, ObjectSidebar::OnSelectFilter) EVT_LISTBOX(ID_SelectObject, ObjectSidebar::OnSelectObject) EVT_BUTTON(ID_ToggleViewer, ObjectSidebar::OnToggleViewer) + EVT_LISTBOX_DCLICK(ID_SelectObject, ObjectSidebar::OnSelectObject) END_EVENT_TABLE(); ////////////////////////////////////////////////////////////////////////// Index: source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h =================================================================== --- source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h +++ source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h @@ -26,6 +26,7 @@ } extern Observable g_SelectedTexture; +extern wxString g_SelectedObject; extern Observable > g_SelectedObjects; Index: source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.cpp =================================================================== --- source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.cpp +++ source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.cpp @@ -20,5 +20,6 @@ #include "MiscState.h" Observable g_SelectedTexture; +wxString g_SelectedObject; Observable > g_SelectedObjects; Index: source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp =================================================================== --- source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp +++ source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp @@ -61,9 +61,9 @@ { StateDrivenTool::Init(initData, scenarioEditor); - wxASSERT(initData); - wxString& id = *static_cast(initData); + wxString& id = initData ? *static_cast(initData) : g_SelectedObject; m_ObjectID = id; + g_SelectedObject = m_ObjectID; SendObjectMsg(true); }