Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Space Types library item collapses after dragging in Space Type from library #116

Closed
macumber opened this issue Aug 31, 2017 · 5 comments
Closed

Comments

@macumber
Copy link
Collaborator

Have to keep opening this to drag in more space types

@ljbrackney
Copy link

Agree. I believe Construction Sets have the same issue. Irritating.

@ljbrackney
Copy link

This needs to be escalated. Now that we're adding larger (DEER) libraries that are needed in real workflows, this becomes a significant PITA.

@jmarrec jmarrec assigned jmarrec and unassigned evanweaver Feb 5, 2019
@jmarrec jmarrec removed their assignment May 13, 2020
@jmarrec jmarrec transferred this issue from NREL/OpenStudio May 13, 2020
@jmarrec
Copy link
Collaborator

jmarrec commented May 31, 2021

Still true as of v1.2.0-rc5

@jmarrec
Copy link
Collaborator

jmarrec commented May 4, 2022

I narrowed it down, this is what triggers it:

ModelObjectListController::ModelObjectListController(const openstudio::IddObjectType& iddObjectType, const model::Model& model, bool showLocalBCL)
: m_iddObjectType(iddObjectType), m_model(model), m_showLocalBCL(showLocalBCL) {
// model.getImpl<model::detail::Model_Impl>().get()->addWorkspaceObjectPtr.connect<ModelObjectListController, &ModelObjectListController::objectAdded>(this);
connect(OSAppBase::instance(), &OSAppBase::workspaceObjectAddedPtr, this, &ModelObjectListController::objectAdded, Qt::QueuedConnection);
//model.getImpl<model::detail::Model_Impl>().get()->removeWorkspaceObjectPtr.connect<ModelObjectListController, &ModelObjectListController::objectRemoved>(this);
connect(OSAppBase::instance(), &OSAppBase::workspaceObjectRemovedPtr, this, &ModelObjectListController::objectRemoved, Qt::QueuedConnection);
}
IddObjectType ModelObjectListController::iddObjectType() const {
return m_iddObjectType;
}
void ModelObjectListController::objectAdded(std::shared_ptr<openstudio::detail::WorkspaceObject_Impl> impl,
const openstudio::IddObjectType& iddObjectType, const openstudio::UUID& handle) {
if (iddObjectType == m_iddObjectType) {
std::vector<OSItemId> ids = this->makeVector();
emit itemIds(ids);
for (const OSItemId& id : ids) {
if (id.itemId() == toQString(impl->handle())) {
emit selectedItemId(id);
break;
}
}
}
}

partial backtrace:

(lldb) c
Process 45337 resuming
Process 45337 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.29
    frame #0: 0x0000000100633cc4 OpenStudioApp`openstudio::OSDropZone::onDrop(this=0x000060000304d9e0, itemId=0x000000016fdf9de8) at OSDropZone.cpp:252:20
   249 	}
   250
   251 	void OSDropZone::onDrop(const OSItemId& itemId) {
-> 252 	  emit itemDropped(itemId);
   253 	}
   254
   255 	void OSDropZone::setItemIds(const std::vector<OSItemId>& itemIds) {
Target 0: (OpenStudioApp) stopped.
(lldb) c
Process 45337 resuming
Process 45337 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.30
    frame #0: 0x00000001006668ac OpenStudioApp`openstudio::OSVectorController::onDrop(this=0x0000600000397740, itemId=0x000000016fdf9de8) at OSVectorController.cpp:60:58
   57
   58  	void OSVectorController::onReplaceItem(OSItem* currentItem, const OSItemId& replacementItemId) {}
   59
-> 60  	void OSVectorController::onDrop(const OSItemId& itemId) {}
   61
   62  	void OSVectorController::onMakeNewItem() {}
   63
Target 0: (OpenStudioApp) stopped
(lldb) c
Process 45337 resuming
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:SpaceType' and named '189.1-2009 - Office - BreakRoom - CZ1-3' to '189.1-2009 - Office - BreakRoom - CZ1-3 1' to avoid a name conflict upon WorkspaceObject addition.
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:People' and named '189.1-2009 - Office - BreakRoom - CZ1-3 People' to '189.1-2009 - Office - BreakRoom - CZ1-3 People 1' to avoid a name conflict upon WorkspaceObject addition.
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:Lights' and named '189.1-2009 - Office - BreakRoom - CZ1-3 Lights' to '189.1-2009 - Office - BreakRoom - CZ1-3 Lights 1' to avoid a name conflict upon WorkspaceObject addition.
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:ElectricEquipment' and named '189.1-2009 - Office - BreakRoom - CZ1-3 Electric Equipment' to '189.1-2009 - Office - BreakRoom - CZ1-3 Electric Equipment 1' to avoid a name conflict upon WorkspaceObject addition.
[utilities.idf.Workspace] <-1> Renamed Object of type 'OS:SpaceInfiltration:DesignFlowRate' and named '189.1-2009 - Office - BreakRoom - CZ1-3 Infiltration' to '189.1-2009 - Office - BreakRoom - CZ1-3 Infiltration 1' to avoid a name conflict upon WorkspaceObject addition.
[OSGridView] <-2> Creating cell wrapper row=2, col=0
[OSGridView] <-2> Creating cell wrapper row=2, col=1
[OSGridView] <-2> Creating cell wrapper row=2, col=2
[OSGridView] <-2> Creating cell wrapper row=2, col=3
[OSGridView] <-2> Creating cell wrapper row=2, col=4
[OSGridView] <-2> Creating cell wrapper row=2, col=5
[OSGridView] <-2> Creating cell wrapper row=2, col=6
[OSGridView] <-2> Creating cell wrapper row=2, col=7
Process 45337 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 22.1
    frame #0: 0x00000001005f0a58 OpenStudioApp`openstudio::OSCollapsibleItemList::onItemSelected(this=0x000060000338c820, item=0x000000016aa23920) at OSCollapsibleItemList.cpp:216:16
   213 	}
   214
   215 	void OSCollapsibleItemList::onItemSelected(OSItem* item) {
-> 216 	  QLayoutItem* layoutItem = nullptr;
   217 	  OSCollapsibleItem* collapsibleItem = nullptr;
   218
   219 	  for (int i = 0; i < m_vLayout->count(); ++i) {
Target 0: (OpenStudioApp) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 22.1
  * frame #0: 0x00000001005f0a58 OpenStudioApp`openstudio::OSCollapsibleItemList::onItemSelected(this=0x000060000338c820, item=0x000000016aa23920) at OSCollapsibleItemList.cpp:216:16
    frame #1: 0x00000001005f7648 OpenStudioApp`QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<openstudio::OSItem*>, void, void (openstudio::OSCollapsibleItemList::*)(openstudio::OSItem*)>::call(f=3c 0a 5f 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x000060000338c820, arg=0x000000016fdf8e18)(openstudio::OSItem*), openstudio::OSCollapsibleItemList*, void**) at qobjectdefs_impl.h:171:13
    frame #2: 0x00000001005f75a8 OpenStudioApp`void QtPrivate::FunctionPointer<void (openstudio::OSCollapsibleItemList::*)(openstudio::OSItem*)>::call<QtPrivate::List<openstudio::OSItem*>, void>(f=3c 0a 5f 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x000060000338c820, arg=0x000000016fdf8e18)(openstudio::OSItem*), openstudio::OSCollapsibleItemList*, void**) at qobjectdefs_impl.h:208:13
    frame #3: 0x00000001005f74d8 OpenStudioApp`QtPrivate::QSlotObject<void (openstudio::OSCollapsibleItemList::*)(openstudio::OSItem*), QtPrivate::List<openstudio::OSItem*>, void>::impl(which=1, this_=0x00006000003bb8c0, r=0x000060000338c820, a=0x000000016fdf8e18, ret=0x0000000000000000) at qobjectdefs_impl.h:419:17
    frame #4: 0x000000010b2598f4 QtCore`void doActivate<false>(QObject*, int, void**) [inlined] QtPrivate::QSlotObjectBase::call(this=0x00006000003bb8c0, r=0x000060000338c820, a=0x000000016fdf8e18) at qobjectdefs_impl.h:399:51 [opt]
    frame #5: 0x000000010b2598d8 QtCore`void doActivate<false>(sender=0x0000600002cea780, signal_index=8, argv=0x000000016fdf8e18) at qobject.cpp:3919:26 [opt]
    frame #6: 0x00000001012e3d00 OpenStudioApp`openstudio::OSCollapsibleItem::itemSelected(this=0x0000600002cea780, _t1=0x000000016aa23920) at moc_OSCollapsibleItem.cpp:265:5
    frame #7: 0x00000001005ee710 OpenStudioApp`QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<openstudio::OSItem*>, void, void (openstudio::OSCollapsibleItem::*)(openstudio::OSItem*)>::call(f=a0 3c 2e 01 01 00 00 00 00 00 00 00 00 00 00 00, o=0x0000600002cea780, arg=0x000000016fdf9078)(openstudio::OSItem*), openstudio::OSCollapsibleItem*, void**) at qobjectdefs_impl.h:171:13
    frame #8: 0x00000001005ee670 OpenStudioApp`void QtPrivate::FunctionPointer<void (openstudio::OSCollapsibleItem::*)(openstudio::OSItem*)>::call<QtPrivate::List<openstudio::OSItem*>, void>(f=a0 3c 2e 01 01 00 00 00 00 00 00 00 00 00 00 00, o=0x0000600002cea780, arg=0x000000016fdf9078)(openstudio::OSItem*), openstudio::OSCollapsibleItem*, void**) at qobjectdefs_impl.h:208:13
    frame #9: 0x00000001005ee5a0 OpenStudioApp`QtPrivate::QSlotObject<void (openstudio::OSCollapsibleItem::*)(openstudio::OSItem*), QtPrivate::List<openstudio::OSItem*>, void>::impl(which=1, this_=0x00006000003bb780, r=0x0000600002cea780, a=0x000000016fdf9078, ret=0x0000000000000000) at qobjectdefs_impl.h:419:17
    frame #10: 0x000000010b2598f4 QtCore`void doActivate<false>(QObject*, int, void**) [inlined] QtPrivate::QSlotObjectBase::call(this=0x00006000003bb780, r=0x0000600002cea780, a=0x000000016fdf9078) at qobjectdefs_impl.h:399:51 [opt]
    frame #11: 0x000000010b2598d8 QtCore`void doActivate<false>(sender=0x00006000021e6e90, signal_index=7, argv=0x000000016fdf9078) at qobject.cpp:3919:26 [opt]
    frame #12: 0x00000001012f0478 OpenStudioApp`openstudio::OSItemSelector::itemSelected(this=0x00006000021e6e90, _t1=0x000000016aa23920) at moc_OSItemSelector.cpp:175:5
    frame #13: 0x000000010065bebc OpenStudioApp`openstudio::OSItemList::selectItem(this=0x00006000021e6e90, selectItem=0x000000016aa23920) at OSItemList.cpp:275:14
    frame #14: 0x000000010065b05c OpenStudioApp`openstudio::OSItemList::setItemIds(this=0x00006000021e6e90, itemIds=size=32) at OSItemList.cpp:207:3
    frame #15: 0x0000000100661954 OpenStudioApp`QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&>, void, void (openstudio::OSItemList::*)(std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&)>::call(f=d0 ae 65 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x00006000021e6e90, arg=0x000000016fdf93c8)(std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&), openstudio::OSItemList*, void**) at qobjectdefs_impl.h:171:13
    frame #16: 0x00000001006618b8 OpenStudioApp`void QtPrivate::FunctionPointer<void (openstudio::OSItemList::*)(std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&)>::call<QtPrivate::List<std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&>, void>(f=d0 ae 65 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x00006000021e6e90, arg=0x000000016fdf93c8)(std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&), openstudio::OSItemList*, void**) at qobjectdefs_impl.h:208:13
    frame #17: 0x00000001006617e8 OpenStudioApp`QtPrivate::QSlotObject<void (openstudio::OSItemList::*)(std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&), QtPrivate::List<std::__1::vector<openstudio::OSItemId, std::__1::allocator<openstudio::OSItemId> > const&>, void>::impl(which=1, this_=0x00006000003bb1a0, r=0x00006000021e6e90, a=0x000000016fdf93c8, ret=0x0000000000000000) at qobjectdefs_impl.h:419:17
    frame #18: 0x000000010b2598f4 QtCore`void doActivate<false>(QObject*, int, void**) [inlined] QtPrivate::QSlotObjectBase::call(this=0x00006000003bb1a0, r=0x00006000021e6e90, a=0x000000016fdf93c8) at qobjectdefs_impl.h:399:51 [opt]
    frame #19: 0x000000010b2598d8 QtCore`void doActivate<false>(sender=0x000060000184b380, signal_index=3, argv=0x000000016fdf93c8) at qobject.cpp:3919:26 [opt]
    frame #20: 0x00000001012f18a0 OpenStudioApp`openstudio::OSVectorController::itemIds(this=0x000060000184b380, _t1=size=32) at moc_OSVectorController.cpp:200:5
    frame #21: 0x00000001005c6d20 OpenStudioApp`openstudio::ModelObjectListController::objectAdded(this=0x000060000184b380, impl=std::__1::shared_ptr<openstudio::detail::WorkspaceObject_Impl>::element_type @ 0x000000016aa5e1c8 strong=66 weak=2, iddObjectType=0x000060000004eb00, handle=0x000060000004c870) at ModelObjectListView.cpp:74:10
    frame #22: 0x00000001005ccc8c OpenStudioApp`QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1, 2>, QtPrivate::List<std::__1::shared_ptr<openstudio::detail::WorkspaceObject_Impl>, openstudio::IddObjectType const&, openstudio::UUID const&>, void, void (openstudio::ModelObjectListController::*)(std::__1::shared_ptr<openstudio::detail::WorkspaceObject_Impl>, openstudio::IddObjectType const&, openstudio::UUID const&)>::call(f=b0 6c 5c 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x000060000184b380, arg=0x00006000018620c0)(std::__1::shared_ptr<openstudio::detail::WorkspaceObject_Impl>, openstudio::IddObjectType const&, openstudio::UUID const&), openstudio::ModelObjectListController*, void**) at qobjectdefs_impl.h:171:13

@jmarrec
Copy link
Collaborator

jmarrec commented Oct 14, 2024

Can't reproduce on v1.8.0 with Ubuntu 24.04. I suppose this was changed in #713.

@macumber Can you try on windows (or any other platform) to confirm?

@jmarrec jmarrec closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants