Bug 80852

Summary: Confusion with tab name on save-as
Product: [Applications] kdevelop Reporter: Jon Smirl <jonsmirl>
Component: generalAssignee: KDevelop Developers <kdevelop-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jon Smirl 2004-05-03 20:20:46 UTC
Version:           CVS (using KDE Devel)
Installed from:    Compiled sources

Open file a
Save as b
The edit buffer will still be named a in tab

Things are now confused.
Try to open b, it won't open
Open a and it will work, you'll have two a's open

The tab and the internal file name are in disagreement.
Comment 1 Jens Dagerbo 2004-05-03 22:04:12 UTC
CVS commit by dagerbo: 

make "save as" change the tab caption correctly again

CCMAIL: 80852-done@bugs.kde.org


  M +6 -5      newmainwindow.cpp   1.14


--- kdevelop/src/newmainwindow.cpp  #1.13:1.14
@@ -584,11 +584,12 @@ void NewMainWindow::slotPartURLChanged( 
         kdDebug() << k_funcinfo << endl;
         
-        if ( !ro_part || !ro_part->widget() || !ro_part->widget()->parentWidget() ) return;
-        
-        KMdiChildView * childView = dynamic_cast<KMdiChildView*>( ro_part->widget()->parentWidget() );
+        if ( QWidget * widget = EditorProxy::getInstance()->topWidgetForPart( ro_part ) )
+        {
+                KMdiChildView * childView = dynamic_cast<KMdiChildView*>( widget->parentWidget() );
         if ( childView )
         {
                 childView->setMDICaption( ro_part->url().fileName() );
         }
+        }
 }
 


Comment 2 Jens Dagerbo 2004-05-03 22:05:32 UTC
We broke this with the new "fast loading editor" mechanism recently. Thanks for the report!