prevent popup deactivation while button_down
[goodguy/history.git] / cinelerra-5.0 / cinelerra / assetedit.C
index c7ef9f24e8755e62e090172fe514f021233b95fb..5422d97eef2c77cc954b099022010a3f34746457 100644 (file)
@@ -796,9 +796,14 @@ DetailAssetThread::DetailAssetThread(MWindow *mwindow)
 }
 
 DetailAssetThread::~DetailAssetThread()
+{
+       stop();
+}
+
+void DetailAssetThread::stop()
 {
        if( Thread::running() ) {
-               dwindow->lock_window("DetailAssetThread::~DetailAssetThread");
+               dwindow->lock_window("DetailAssetThread::stop");
                dwindow->set_done(1);
                dwindow->unlock_window();
                Thread::join();
@@ -831,11 +836,10 @@ void DetailAssetWindow::create_objects()
 
 void DetailAssetThread::start(Asset *asset)
 {
-       if( !Thread::running() ) {
-               delete dwindow;
-               dwindow = new DetailAssetWindow(mwindow, asset);
-               Thread::start();
-       }
+       stop();
+       delete dwindow;
+       dwindow = new DetailAssetWindow(mwindow, asset);
+       Thread::start();
 }
 
 void DetailAssetThread::run()